import React, { Component } from "react";
import { NavBar, Icon } from "antd-mobile";
import { withRouter } from "react-router-dom";
import "./YHNav.scss";
class YHNav extends Component {
  render() {
    return (
      <NavBar
        mode="light"
        icon={<Icon type="left"/>}
        onLeftClick={() => this.props.history.go(-1)}
        rightContent={[
          <Icon key="1" type="ellipsis" />,
      ]}
      >
        {this.props.title}
      </NavBar>
    );
  }
}

export default withRouter(YHNav);
